import { createApp } from 'vue'
import { createPinia } from 'pinia'

import App from './App.vue'
import router from './router'

import Antd from 'ant-design-vue'
import 'ant-design-vue/dist/reset.css'

import '@/access'
import scramble from '@/directives/scrambleText'
// import Lenis from 'lenis'

const app = createApp(App)

app.use(createPinia())
app.use(router)
app.use(Antd)
app.directive('scramble', scramble)

app.mount('#app')

// 平滑滚动（Lenis）- 暂时禁用以恢复滚轮功能
// const lenis = new Lenis({
//   duration: 1.2,
//   easing: (t: number) => Math.min(1, 1.001 - Math.pow(2, -10 * t)),
//   smoothWheel: true,
//   wheelMultiplier: 1,
//   touchMultiplier: 2,
//   infinite: false,
// })

// function raf(time: number) {
//   lenis.raf(time)
//   requestAnimationFrame(raf)
// }
// requestAnimationFrame(raf)
